home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1998 July / EnigmA AMIGA RUN 29 (1998)(G.R. Edizioni)(IT)[!][issue 1998-07 & 08].iso / earcd / utils / vinced / include / owner.h < prev    next >
C/C++ Source or Header  |  1997-07-29  |  7KB  |  158 lines

  1. #ifndef VNC_OWNER_H
  2. #define VNC_OWNER_H
  3. /*********************************************************
  4.  ** ViNCEd                                              **
  5.  ** a DOS - window handler                              **
  6.  **                                                     **
  7.  ** © 1991-97 THOR-Software inc.                        **
  8.  ** Version 3.30                                        **
  9.  **                                                     **
  10.  ** program version 1.23 05/03/91       THOR            **
  11.  ** update  version 1.25 06/19/91       THOR            **
  12.  ** header file 06/19/91                THOR            **
  13.  ** updated to 3.30      03/31/97       THOR            **
  14.  **                                                     **
  15.  ** ViNCEd Owner Definitions                            **
  16.  **-----------------------------------------------------**
  17.  **                                                     **
  18.  ** all use at your own risk,etc.,etc.                  **
  19.  **                                                     **
  20.  ** Everything declared as "reserved" or                **
  21.  ** "not used" is NOT free for your use,                **
  22.  ** it will propably used in a later release.           **
  23.  ** All FREE entries are free for public                **
  24.  ** use and are, if not otherwise noticed,              **
  25.  ** initialized as ZERO                                 **
  26.  *********************************************************/
  27.  
  28. #ifndef EXEC_TYPES_H
  29. #include <exec/types.h>
  30. #endif
  31.  
  32. #ifndef EXEC_LISTS_H
  33. #include <exec/lists.h>
  34. #endif
  35.  
  36. #ifndef EXEC_PORTS_H
  37. #include <exec/ports.h>
  38. #endif
  39.  
  40. #ifndef EXEC_TASKS_H
  41. #include <exec/tasks.h>
  42. #endif
  43.  
  44. #ifndef DEVICES_TIMER_H
  45. #include <devices/timer.h>
  46. #endif
  47.  
  48. #ifndef DOS_DOS_H
  49. #include <dos/dos.h>
  50. #endif
  51.  
  52. #ifndef DOS_DOSEXTENS_H
  53. #include <dos/dosextens.h>
  54. #endif
  55.  
  56. /* The next one is a ViNCEd owner, i.e. the structure assosiated
  57.    to all processes using the same named console for printing/reading.
  58.    Owners setup the foreground/background mechanism, see the guide. */
  59.  
  60. struct ViOwner {
  61.         struct MsgPort          vow_DOSPort;    /* put messages here */
  62.                                                 /* name is the name of the
  63.                                                    console associated to it*/
  64.         UWORD                   vow_UseCount;   /* counts # of times opened*/
  65.         struct List             vow_ReceivedOutNodes;
  66.                                                 /* keeps outnodes, i.e. this
  67.                                                    establishes the output
  68.                                                    buffer */
  69.         UWORD                   vow_RAWCount;   /* reserved */
  70.         struct MsgPort         *vow_BreakPort;  /* send ^C where ?*/
  71.         ULONG                   vow_RequestedEvents;
  72.                                                 /* send which
  73.                                                    input events ?*/
  74.         UWORD                   vow_OutSize;    /* size of the output
  75.                                                    buffer */
  76.  
  77.         UWORD                   vow_ReadPointer;/* file pointer in output
  78.                                                    buffer, set with SEEK */
  79.  
  80.         struct timerequest      vow_TimerIO;    /* used by WaitForChar */
  81.         struct Message         *vow_messagedummy; /* internal use only */
  82.         struct MsgPort         *vow_OwnerPort;  /* pointer to
  83.                                                    this structure */
  84.         ULONG                   vow_Type;       /* always A_Timer.
  85.                                                    This fakes a DOSPacket */
  86.         ULONG                   vow_resultdummy;/* another dummy for faking */
  87.  
  88.         struct MsgPort          vow_EventPort;  /* for incomming events */
  89.  
  90.         UWORD                   vow_WaitingReads; /* counts number of read
  91.                                                      requests */
  92.  
  93.         ULONG                   vow_ParseFlags;   /* see below */
  94.         struct MsgPort         *vow_ReadPort;   /* last reading port, invalid
  95.                                                    if counter=0.
  96.                                                    Used for TAB expansion */
  97.         struct MsgPort         *vow_WritePort;  /* last port writing here.
  98.                                                    Used for ^C */
  99.         struct MsgPort         *vow_PendingPort; /* suspended task in ^Z */
  100.  
  101.         UWORD                   vow_reserved;
  102.         UWORD                   vow_WaitingWrites; /* suspended write
  103.                                                       requests */
  104.  
  105.         struct MinList          vow_SubOwnerList;  /* List of subowners */
  106.  
  107.         struct DosPacket       *vow_WaitPacket;    /* WaitForChar packet */
  108.  
  109.         /* private data beyond this point... do not touch */
  110. };
  111.  
  112. /* The sub-owner structure is allocated once per stream (unlike the
  113.    owner, which is allocated once per named console).
  114.    This is what you find in your file handle */
  115. struct SubOwner {
  116.         struct SubOwner         *vsow_Next;
  117.         struct SubOwner         *vsow_Pred;     /* linked list */
  118.         UBYTE                    vsow_Type;
  119.         UBYTE                    vsow_Pri;
  120.         char                    *vsow_Name;     /* points to name of
  121.                                                    the owner, i.e.
  122.                                                    console name */
  123.         UWORD                    vsow_cludgefill;
  124.         struct Owner            *vsow_Owner;    /* subowner of which
  125.                                                    owner */
  126.         struct FileHandle       *vsow_Stream;   /* no BPTR! Stream
  127.                                                    of this SubOwner */
  128. };
  129.  
  130. /* flags defined in vow_ParseFlags */
  131.  
  132. /* something saved back ?*/
  133. #define VOW_SAVEDBACK_BIT       0
  134. #define VOW_SAVEDBACK_MASK      (1L<<0)
  135.  
  136. /* parsing in ESC or CSI ?*/
  137. #define VOW_SEPARATEPARSE_BIT   8
  138. #define VOW_SEPARATEPARSE_MASK  (1L<<8)
  139.  
  140. /* special character set codes */
  141. #define VOW_FOUNDSS2_BIT        12
  142. #define VOW_FOUNDSS3_MASK       (1L<<12)
  143.  
  144. /* got new read request, title must be rebuild */
  145. #define VOW_GOTNEWREAD_BIT      29
  146. #define VOW_GOTNEWREAD_MASK     (1L<<29)
  147.  
  148. /* owner is not allowed to print, i.e. in background */
  149. #define VOW_STOPME_BIT          30
  150. #define VOW_STOPME_MASK         (1L<<30)
  151.  
  152. /* owner is suspended, and message is printed */
  153. #define VOW_SUSPENDED_BIT       31
  154. #define VOW_SUSPENDED_MASK      (1L<<31)
  155.  
  156. #endif
  157.  
  158.